<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/add.css" />
	<style>
		.spot {
			position: absolute;
			width: 100%;
			height: 100%;
			top: 0;
			left: 0;
		}

		.svg-wrapper {
			margin-top: 0;
			position: relative;
			top: 25%;
			width: 150px;
			height: 40px;
			display: inline-block;
			border-radius: 3px;
			margin-left: 5px;
			margin-right: 5px
		}

		#shape {
			stroke-width: 6px;
			fill: transparent;
			stroke: #009FFD;
			stroke-dasharray: 85 400;
			stroke-dashoffset: -220;
			transition: 1s all ease;
		}

		#text {
			margin-top: -35px;
			text-align: center;
		}

		#text a {
			color: black;
			text-decoration: none;
			font-weight: 100;
			font-size: 1.1em;
		}

		.svg-wrapper:hover #shape {
			stroke-dasharray: 50 0;
			stroke-width: 3px;
			stroke-dashoffset: 0;
			stroke: #06D6A0;
		}

		button {
			background: #dfecd5;
			border: 1px solid #dfecd5;
			position: relative;
			margin-top: -6.5px;
			padding: 6px;
			width: 98%;
		}
	</style>
</head>

<body>
	<div id="app">
		<h1>录入绩效数据</h1>
		<div class="content">
			<div id=time>
				<!--录入测评时间-->
				<h2>测评时间</h2>
				<form name="reg_testdate">
					<select name="YYYY" οnchange="YYYYDD(this.value)">
						<option value="">请选择 年</option>
					</select>
					<select name="MM" οnchange="MMDD(this.value)">
						<option value="">选择 月</option>
					</select>
				</form>
			</div>

			<div class="content-left">
				<div id="area">
					<!--用地集约化-->
					<h2>1.用地集约化</h2>
					<form>
						<!--公式A.1 得R——容积率-->
						<p>
							<label class="label-left">工厂总建筑物建筑面积</label>
							<input id="A-building" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>2</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<p>
							<label class="label-left">工厂总构筑物建筑面积</label>
							<input id="A-structures" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>2</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<p>
							<label class="label-left">工厂用地面积</label>
							<input id="A-area" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>2</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>
					</form>
				</div>

				<div id="porduct">
					<!--生产洁净化-->
					<h2 class="title">2.生产洁净化</h2>
					<form width="50%">
						<p>
							<!--合格产品总量-->
							<label class="label-left">合格产品总量</label>
							<input id="Q" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<!--公式A.5 得s——单位产品污染物产生量-->
						<p>
							<label class="label-left">主要污染物产生量</label>
							<input id="S" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<!--公式A.6 得g——单位产品废气产生量-->
						<p>
							<label class="label-left">废气产生量</label>
							<input id="G" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>3</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<!--公式A.7 得w——单位产品废水产生量-->
						<p>
							<label class="label-left">废水产生量</label>
							<input id="W" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>3</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>
					</form>
				</div>
			</div>

			<div class="content-right">
				<div id="waste">
					<!--废物资源化-->
					<h2 class="title">3.废物资源化</h2>
					<form width="50%">

						<!--公式A.8 得m——单位产品原材料消耗量-->
						<p>
							<label class="label-left">主要原材料消耗量</label>
							<input id="M" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>


						<!--公式A.9 得K-r——工业固体废物综合利用率-->
						<p>
							<label class="label-left">工业固体废物综合利用量</label>
							<input id="Z-t" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>
						<p>
							<label class="label-left">工业固体废物产生量</label>
							<input id="Z" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>
						<p>
							<label class="label-left">综合利用往年存储量</label>
							<input id="Z-w" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<!--公式A.10 得K-w——废水回用量率-->
						<p>
							<label class="label-left">废水处理回用量</label>
							<input id="V-m" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>3</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>
						<p>
							<label class="label-left">向外排放废水量</label>
							<input id="V-d" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>3</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>
					</form>
				</div>

				<div id="energy">
					<!--能源低碳化-->
					<h2 class="title">4.能源低碳化</h2>
					<form width="50%">

						<!--公式A.11 得E-w——单位产品综合能耗-->
						<p>
							<label class="label-left">消耗能源实物量</label>
							<input id="E-l" placeholder="必填">
							<label class="label-right">
								<select>
									<option>t</option>
									<option>m<sup>3</sup></option>
									<option>kg</option>
								</select>
							</label>
						</p>

						<!--公式A.12 得c——单位产品碳排放量-->
						<p>
							<label class="label-left">二氧化碳排放量</label>
							<input id="C" placeholder="必填">
							<label class="label-right">
								<select>
									<option>m<sup>3</sup></option>
									<option>t</option>
									<option>kg</option>
								</select>
							</label>
						</p>
					</form>
				</div>
			</div>
			<div id="button">
				<!--提交、重置按钮-->
				<div class="svg-wrapper">
					<svg height="40" width="150" xmlns="http://www.w3.org/2000/svg">
						<rect id="shape" height="40" width="150" />
						<div id="text">
							<button id="register-button">
								<span class="styled-button__real-text">开始分析</span>
							</button>
						</div>
					</svg>
				</div>
			</div>
		</div>
	</div>
	<script>
		<!--
		function YYYYMMDDstart() {
			//先给年下拉框赋内容
			var y = new Date().getFullYear();
			for (var i = (y - 30); i < (y + 30); i++) //以今年为准，前30年，后30年
				document.reg_testdate.YYYY.options.add(new Option(" " + i + " 年", i));

			//赋月份的下拉框
			for (var i = 1; i < 13; i++)
				document.reg_testdate.MM.options.add(new Option(" " + i + " 月", i));

			document.reg_testdate.YYYY.value = y;
			document.reg_testdate.MM.value = new Date().getMonth() + 1;
		}
		if (document.attachEvent)
			window.attachEvent("onload", YYYYMMDDstart);
		else
			window.addEventListener('load', YYYYMMDDstart, false);

		function optionsClear(e) {
			e.options.length = 1;
		}
		-->
	</script>
	<script src="../../assets/layui.all.js"></script>
	<script src="/qrcode/jquery2.1.4.js"></script>
	<script src="/layer/layer.js"></script>
	<script>
		$(function () {
			$("#register-button").click(function () {


				//年份
				var year = $("#YYYY").val();
				//月份
				var mounth = $("#MM").val();
				//总建筑物面积
				var tatalArea = $("#A-building").val();
				//总构筑物面积
				var tatalBuilUpArea = $("#A-structures").val();
				//工厂用地面积
				var landArea = $("#A-area").val();
				//合格产品总量
				var qualifiedProductQuantity = $("#Q").val();
				//主要污染物产量
				var outputOfMajorPollutans = $("#S").val();
				//废气生产量
				var exhaustGasProduction = $("#G").val();
				//废水生产量
				var wasteWaterProduction = $("#W").val();
				//主要原材料消耗量
				var consumptionOfMajorRawMaterials = $("#M").val();
				//工业固体废物生产量
				var productionOfIndestrialSolid = $("#Z").val();
				//废水处理回用量
				var wasteWaterTreatmentRecyclingAmount = $("#V-m").val();
				//消耗能源实物量
				var amountOfPhysicalEnergyConsumed = $("#E-l").val();
				//二氧化碳排放量
				var carbonDioxideEmissions = $("#C").val();
				//工业固体综合利用量
				var zt = $("#Z-t").val();
				//综合利用往年存储量
				var zw = $("#Z-w").val();
				//向外排放废水量
				var vd = $("#V-d").val();

				//1 先转圈
				var windowId = layer.load(0);

				//2 ajax与服务器交互
				$.post("/performance/insert.do", {
						year: year,
						mounth: mounth,
						tatalArea: tatalArea,
						tatalBuilUpArea: tatalBuilUpArea,
						landArea: landArea,
						qualifiedProductQuantity: qualifiedProductQuantity,
						outputOfMajorPollutans: outputOfMajorPollutans,
						exhaustGasProduction: exhaustGasProduction,
						wasteWaterProduction: wasteWaterProduction,
						consumptionOfMajorRawMaterials: consumptionOfMajorRawMaterials,
						productionOfIndestrialSolid: productionOfIndestrialSolid,
						wasteWaterTreatmentRecyclingAmount: wasteWaterTreatmentRecyclingAmount,
						amountOfPhysicalEnergyConsumed: amountOfPhysicalEnergyConsumed,
						carbonDioxideEmissions: carbonDioxideEmissions,
						zt: zt,
						zw: zw,
						vd: vd
					},
					function (data) {

						//3 关闭load窗口
						layer.close(windowId);

						//4 讲服务器返回结果进行显示
						layer.msg(data.result);


					}, "JSON");
			});
		});
	</script>
</body>

</html>